<template>
    <div class="home">
      <!-- 头部banner -->
			<div class="headerBg">
        <div class="inputBox">
          <input type="text" placeholder="斗地主">
        <div class="add" @click="addType">
           <i class="iconfont icon-jiahao"></i>
        </div>
        </div>
      <icon-list />
      </div>
      <!-- 最近在玩 -->
      <div class="recently">
        <div class="title f-left">最近在玩</div>
        <span class="gameIcon f-right">
          <div class="gameIconItme"><img src="../../assets/img/004.png" alt=""></div>
          <div class="gameIconItme"><img src="../../assets/img/004.png" alt=""></div>
          <div class="gameIconItme"><img src="../../assets/img/004.png" alt=""></div>
          <div class="gameIconItme"><img src="../../assets/img/004.png" alt=""></div>
          <div class="gameIconItme"><img src="../../assets/img/004.png" alt=""></div>
        </span>
      </div>
      <game-list :name="'热门推荐'" />
      <game-list :name="'下载专区'" />
      <game-list :name="'大型网游'" />
      <footer-bar class="footer"/>
    </div>
</template>
<script>
import HeaderBar from "@/components/headerBar";
import FooterBar from "@/components/footerBar";
import gameList from "./com/gameList";
import iconList from "./com/iconList";
export default {
  name: "Home",
  data() {
    return {
      name: "",
      username: "55"
    };
  },
  components: {
    FooterBar,
    HeaderBar,
    gameList,
    iconList
  },
  methods: {
    addType() {
      this.$router.push("/gameClass");
    }
  }
};
</script>
<style lang="stylus" scoped>
.home {
  padding-bottom: 43px;
  background-color: #fff;

  .headerBg {
    width: 100%;
    height: 2.75rem;
    background: url('../../assets/img/banner.png') center center;
    background-size: 100% 100%;
    margin-bottom: 0.2rem;
    position: relative;

    .inputBox {
      height: 0.8rem;
    }

    input {
      background: #818181;
      width: 2.67rem;
      height: 0.24rem;
      position: absolute;
      top: 0.35rem;
      left: 0.25rem;
      color: #fff;
      border-radius: 0.05rem;
      font-size: 0.12rem;
      padding-left: 0.28rem;
      color: #FFFFFF;
    }

    .add {
      font-size: 0.25rem;
      color: #fff;
      position: absolute;
      top: 0.35rem;
      right: 0.25rem;
      font-weight: 200;

      i {
        font-size: 20px;
      }
    }

    input::-webkit-input-placeholder {
      font-size: 0.12rem;
      font-family: PingFang-SC-Medium;
      font-weight: 500;
    }
  }

  .recently {
    width: 95%;
    height: 0.48rem;
    line-height: 0.48rem;
    margin: 0 auto;
    border-bottom: 1px solid #E6E6E6;

    .gameIcon {
      .gameIconItme {
        width: 0.32rem;
        height: 0.32rem;
        margin-top: 0.05rem;
        margin-left: 0.08rem;
        float: right;
        position: relative;

        img {
          width: 0.32rem;
          height: 0.32rem;
          position: absolute;
        }
      }
    }
  }

  .f-left {
    float: left;
  }

  .f-right {
    float: right;
  }

  .title {
    color: #000;
    font-size: 0.16rem;
    font-family: 'PingFang-SC-Bold';
    font-weight: bold;
  }

  .footer {
    position: fixed;
    bottom: -0.05rem;
  }
}
</style>
